﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WPFPrismAPI.Service
{
    public class ApiResponse
    {
        public string Message { get; set; }
        public bool Status { get; set; }

        public object Result { get; set; }
        /// <summary>
        /// 返回消息，错误的时候
        /// </summary>
        /// <param name="message"></param>
        /// <param name="status"></param>
        public ApiResponse(string message, bool status = false)
        {
            this.Message = message;
            this.Status = status;
        }
        /// <summary>
        /// 返回状态和结果，正确的时候
        /// </summary>
        /// <param name="status"></param>
        /// <param name="result"></param>
        public ApiResponse(bool status, object result)
        {
            this.Status = status;
            this.Result = result;
        }


    }
}
